package com.sfy.login.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Description
 * @Author 谷晓天
 * @Date 2021/7/5 1:50 下午
 */
@Data
@NoArgsConstructor
@TableName("t_user_log")
public class UserLog {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private Integer uid;
    private Integer typeid;
    private String ip;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date ctime;

    public UserLog(Integer uid, Integer typeid, String ip, Date ctime) {
        this.uid = uid;
        this.typeid = typeid;
        this.ip = ip;
        this.ctime = ctime;
    }
}
